Package-level declarations
Functions
Append one PCM chunk into the open ingest stream (copies bytes).
Blocks until the session reaches a terminal state (Finished, Error, or Idle). Returns 0 for Finished, 1 for Error, 2 for Idle (stopped externally).
Begin a streaming load: macos_playback_session_append feeds PCM chunks; macos_playback_session_end_stream closes ingest. knownByteCount may be -1 for unbounded/live content.
Writes buffered-range start/end (nanoseconds, end-exclusive) into out pointers.
Close the ingest stream so the transport can finish after draining.
Returns the last playback error message bytes (UTF-8), or null if none. Caller must macos_free the pointer. Writes length into sizePtr.
Legacy whole-buffer load (still used by older callers). Prefer begin/append/end for long content so the JVM need not retain the full PCM.
Start playback. State transitions are managed by the JVM caller; use macos_playback_session_await_completion to block until a terminal state.
Current transport position in nanoseconds.
Dispose StableRef when you're fully done with the session.
Transport seek on the native AudioQueue session.
Pause an active recording. Capture halts but the AudioQueue + buffers stay allocated so macos_recording_session_resume is cheap and the previously captured chunks remain in the session's hot flow.
Dispose StableRef when you're fully done with the session (after stop/reset).
Resume a previously paused recording.
Start recording and stream updates to the provided callbacks.